package com.quanyan.comment.reqeust;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by jian.zhou on 2016/5/26.
 *  评论查询请求对象
 */
public class ReqCommentQuery extends ReqBaseParam{


    private Integer pageNum ;

    private Integer pageSize;

    /**
     * 查询带回复的评论
     */
    private boolean flagRelay = false;


    private Integer fromUid;

    private Integer toUid;

    private Integer peopleTotal = 0;


    private Integer category_id;

    public Integer getCategory_id() {
        return category_id;
    }

    public void setCategory_id(Integer category_id) {
        this.category_id = category_id;
    }

    public Integer getPeopleTotal() {
        return peopleTotal;
    }

    public void setPeopleTotal(Integer peopleTotal) {
        this.peopleTotal = peopleTotal;
    }

    public Integer getFromUid() {
        return fromUid;
    }

    public void setFromUid(Integer fromUid) {
        this.fromUid = fromUid;
    }

    public Integer getToUid() {
        return toUid;
    }

    public void setToUid(Integer toUid) {
        this.toUid = toUid;
    }

    public boolean isFlagRelay() {
        return flagRelay;
    }

    public void setFlagRelay(boolean flagRelay) {
        this.flagRelay = flagRelay;
    }

    public Integer getPageNum() {
        if(this.pageNum == null)
            this.pageNum = 0;

        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        if(this.pageSize == null)
            this.pageSize = 10 ;

        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }




    public Map<String,Object> toMap(){
        Map<String,Object> map = new HashMap<String, Object>();
        map.put("systemCode",this.getSystemCode());
        map.put("businessCode",this.getBusinessCode());
        map.put("businessId",this.getBusinessId());
        map.put("fromUid",this.getFromUid());
        map.put("toUid",this.getToUid());
        if(this.getCommonParam() != null )
            map.put("commonParam",this.getCommonParam());

        return  map;
    }
}
